<template>
  <div class="content">
    <div class="datasa">
      <div class="biai">营业执照</div>
      <el-card class="box-card">
        <el-form ref="form" :model="formData" class="con-froms">
          <div style="display: flex">
            <el-form-item style="flex: 1" class="" label="">
              <el-row :gutter="110">
                <el-col :span="24">
                  <div class="avatar" v-if="formData.business_license_pic  ">
                    <div
                      style="width: 100%; display: flex; justify-content: flex-end"
                      class="xinimgs"
                    >
                      <i
                        class="el-icon-delete"
                        @click="yyImg()"
                        v-show="!detailShow"
                        style="z-index: 10"
                      ></i>
                    </div>
                    <el-image
                      style=""
                      :src="$baseUrl + formData.code_img"
                      :fit="contain"
                    ></el-image>
                  </div>
                  <el-upload
                    v-else
                    name="image"
                    class="avatar-uploader"
                    :action="baseImgUrl"
                    :show-file-list="false"
                    :on-success="yySuccess"
                    :before-upload="beforeAvatarUpload"
                  >
                    <div class="avatar-uploader-icon">
                      <i class="el-icon-plus"></i>
                      <!-- <span>公司章程</span> -->
                    </div>
                  </el-upload>
                </el-col>
              </el-row>
            </el-form-item>
          </div>
        </el-form>
      </el-card>
    </div>
    <div class="datasa">
      <div class="biai">
        公司信息
        <!-- <button @click="choose">点我选择区域</button>
  <div class="divwrap" v-if="show">
    <v-distpicker type="mobile" @province="onChangeProvince" @city="onChangeCity" @area="onChangeArea"></v-distpicker>
  </div> -->
      </div>

      <el-card class="box-card">
        <div
          v-if="csionasd"
          style="display: flex; justify-content: flex-end; padding: 5px"
        >
          <el-button plain @click="dianjis">{{ dianjitxt }}</el-button>
          <el-button plain @click="dianjis">申请企业公安认证</el-button>
        </div>
        <el-form
          ref="form"
          :model="formData"
          label-width="150px"
          class="con-from"
        >
          <div style="display: flex">
            <el-form-item style="flex: 3" label="统一机构代码 :">
              <el-input    :disabled="dianji" v-model="formData.unify_social_credit_code"></el-input>
            </el-form-item>
            <!-- <el-form-item
              v-if="!csionasd"
              style="flex: 1"
              label=""
            >
            点击申请工商认证获取到公司信息然后展示在下面公司信息里
            </el-form-item> -->
            <!-- <el-button
              style="height: 40px; margin-left: 10px"
              v-if="formData.unify_code"
              plain
              @click="ResizeO"
              v-model="formData.meetingNum"
              >申请工商认证</el-button
            > -->
          </div>
          <div v-if="csionasd" style="display: flex">
            <el-form-item style="flex: 1" label="企业名称 :">
              <el-input
                :disabled="dianji"
                v-model="shidata.company_name   "
              ></el-input>
            </el-form-item>
            <el-form-item style="flex: 1" label="法定代表人 :">
              <el-input :disabled="dianji" v-model="shidata.corporate_information"></el-input>
            </el-form-item>
          </div>
          <div v-if="csionasd" style="display: flex">
            <el-form-item style="flex: 1" label="登记状态 :">
              <el-input
                :disabled="dianji"
                v-model="shidata.dj_state"
              ></el-input>
            </el-form-item>
            <el-form-item style="flex: 1" label="成立时间 :">
              <!-- <el-input
             
              ></el-input> -->
              <el-date-picker
                class="shiji"
                :disabled="dianji"
                v-model="shidata.foundingtime"
                type="date"
                :placeholder="shidata.foundingtime"
              >
              </el-date-picker>
            </el-form-item>
          </div>
          <div v-if="csionasd" style="display: flex">
            <el-form-item style="flex: 1" label="组织机构代码 :">
              <el-input
                :disabled="dianji"
                v-model="shidata.organizationcode   "
              ></el-input>
            </el-form-item>
            <el-form-item style="flex: 1" label="工商注册号 :">
              <el-input
                :disabled="dianji"
                v-model="shidata.registrationnumber    "
              ></el-input>
            </el-form-item>
          </div>
          <div v-if="csionasd" style="display: flex">
            <el-form-item style="flex: 1" label="纳税人识别号 :">
              <el-input
                :disabled="dianji"
                v-model="shidata.nsr_no"
              ></el-input>
            </el-form-item>
            <el-form-item style="flex: 1" label="企业类型 :">
              <el-input
                :disabled="dianji"
                v-model="shidata.enterprise_nature    "
              ></el-input>
            </el-form-item>
          </div>
          <div v-if="csionasd" style="display: flex">
            <el-form-item style="flex: 1" label="营业期限 :">
             <!-- yy_term_start  yy_term_end  -->
              <el-date-picker
              style="    width: 100%;"
               :disabled="dianji"
      v-model="value1"
      type="daterange"
      range-separator="至"
      :start-placeholder="shidata.yy_term_start"
      :end-placeholder="shidata.yy_term_end">
    </el-date-picker>
              <!-- <el-input
                :disabled="dianji"
                v-model="shidata.comtype"
              ></el-input> -->
            </el-form-item>
            <el-form-item style="flex: 1" label="纳税人资质 :">
              <el-input
                :disabled="dianji"
                v-model="shidata.nsr_zizhi"
              ></el-input>
            </el-form-item>
          </div>
          <div v-if="csionasd" style="display: flex">
            <el-form-item style="flex: 1" label="人员规模 :">
              <el-input
                :disabled="dianji"
                v-model="shidata.ren_number"
              ></el-input>
            </el-form-item>
            <el-form-item style="flex: 1" label="参保人数 :">
              <el-input
                :disabled="dianji"
                v-model="shidata.cb_number"
              ></el-input>
            </el-form-item>
          </div>
          <div v-if="csionasd" style="display: flex">
            <el-form-item style="flex: 1" label="核准日期 :">
              <el-input
                :disabled="dianji"
                v-model="shidata.hz_time"
              ></el-input>
            </el-form-item>
            <el-form-item style="flex: 1" label="所属地区 :">
              <el-input
                :disabled="dianji"
                v-model="shidata.province  "
              ></el-input>
            </el-form-item>
          </div>
          <div v-if="csionasd" style="display: flex">
            <el-form-item style="flex: 1" label="登记机关 :">
              <el-input
                :disabled="dianji"
                v-model="shidata.dj_jiguan"
              ></el-input>
            </el-form-item>
            <el-form-item style="flex: 1" label="注册地址 :">
              <el-input
                :disabled="dianji"
                v-model="shidata.contact_address"
              ></el-input>
            </el-form-item>
          </div>
          <div v-if="csionasd" style="display: flex">
            <el-form-item style="flex: 1" label="营业范围 :">
              <el-input
                type="textarea"
                :disabled="dianji"
                v-model="shidata.scopeofbusiness   "
              ></el-input>
            </el-form-item>
          </div>
          <!-- <div style="display: flex">
            <el-form-item style="flex: 1" label="企业性质 :">
              <el-input
                :disabled="dianji"
                v-model="formData.comtype"
              ></el-input>
            </el-form-item>
            <el-form-item style="flex: 1" label="企业详细地址 :">
              <el-input
                :disabled="dianji"
                v-model="formData.contact_address"
              ></el-input>
            </el-form-item>
          </div> -->
        </el-form>
      </el-card>
    </div>
    <!-- <div class="datasa">
      <div class="biai">公司章程</div>
      <el-card class="box-card">
        <el-form
          ref="form"
          :model="formData"
          label-width="150px"
          class="con-from"
        >
          <div style="display: flex">
            <el-form-item style="flex: 1" class="" label="">
              <el-row :gutter="110">
                <el-col :span="24">
                  <div class="avatar" v-if="formData.constitution">
                        <div class="xinimg">
                      <i
                        class="el-icon-delete"
                        @click="zcImg()"
                        v-show="!detailShow"
                        style="z-index: 10"
                      ></i>
                    </div>
                    <el-image
                      style="height: 250px"
                      :src="$baseUrl + formData.constitution"
                      :fit="contain"
                    ></el-image>
                    <i
                      class="el-icon-delete"
                      @click="zcImg()"
                      v-show="!detailShow"
                      style="z-index: 10"
                    ></i>
                  </div>
                  <el-upload
                    v-else
                    name="image"
                    class="avatar-uploader"
                    :action="baseImgUrl"
                    :show-file-list="false"
                    :on-success="zcSuccess"
                    :before-upload="beforeAvatarUpload"
                  >
                    <div class="avatar-uploader-icon">
                      <i class="el-icon-plus"></i>
                      <span>公司章程</span>
                    </div>
                  </el-upload>
                </el-col>
              </el-row>
            </el-form-item>
          </div>
        </el-form>
      </el-card>
    </div> -->
    <div class="datasa">
      <div class="biai">公司章程</div>
      <el-card class="box-card">
        <el-form ref="form" :model="formData" class="con-from">
          <div style="display: flex">
            <el-form-item style="flex: 1" class="" label="">
              <el-row :gutter="110">
                <el-col :span="24">
                  <div class="avatar" v-if="formData.constitution">
                    <div
                      style="width: 100%; display: flex; justify-content: flex-end"
                    >
                      <i
                        class="el-icon-delete"
                        @click="sjImg()"
                        v-show="!detailShow"
                        style="z-index: 10"
                      ></i>
                    </div>
                    <div style="width: 80%" class="xinimgs">
                      <div style="display: flex; align-items: center">
                        <div>
                          <img
                            style="height: 80px"
                            src="@/assets/BidSecurity/EP_PDF.png"
                            alt=""
                          />
                        </div>
                        <div style="font-size: 16px">
                          <div>文件地址：</div>
                          <div>
                            {{ formData.constitution }}
                          </div>
                        </div>
                      </div>
                      <div style="">
                        <el-button @click="zcSuccess" plain>预览</el-button>
                        <el-button plain>查看模板</el-button>
                      </div>
                    </div>
                  </div>
                  <el-upload
                    v-else
                    name="image"
                    class="avatar-uploader"
                    :action="baseImgUrl"
                    :show-file-list="false"
                    :on-success="zcSuccess"
                    :before-upload="beforeAvatarUpload"
                  >
                    <div class="avatar-uploader-icon">
                      <i class="el-icon-plus"></i>
                    </div>
                  </el-upload>
                </el-col>
              </el-row>
            </el-form-item>
          </div>
        </el-form>
      </el-card>
    </div>
    <div class="datasa">
      <div class="biai">对公账户</div>
      <el-card class="box-card">
        <el-form
          ref="form"
          :model="formData"
          label-width="150px"
          class="con-from"
        >
          <div style="display: flex">
            <el-form-item style="flex: 1" label="开户银行 :">
              <el-input v-model="formData.account_bank"></el-input>
            </el-form-item>
            <el-form-item style="flex: 1" label="开户账号 :">
              <el-input v-model="formData.basic_account"></el-input>
            </el-form-item>
          </div>
          <div style="display: flex">
            <el-form-item style="flex: 1" label="账号名称 :">
              <el-input v-model="formData.account_name"></el-input>
            </el-form-item>
            <el-form-item style="flex: 1" label="开户行地址 :">
              <el-input v-model="formData.basic_accname"></el-input>
            </el-form-item>
          </div>
          <div style="display: flex">
            <!-- <el-form-item style="flex: 1" label="账号名称 :">
              <el-input v-model="formData.account_name"></el-input>
            </el-form-item> -->
            <el-form-item style="width: 50%" label="开户行联行号 :">
              <el-input v-model="form.name"></el-input>
            </el-form-item>
            <!-- <el-form-item style="flex: 1" label="开户行地址 :">
              <el-input v-model="form.name"></el-input>
            </el-form-item> -->
          </div>
          <div style="display: flex">
            <el-form-item style="flex: 1" class="" label="开户许可证">
              <el-row :gutter="110">
                <el-col :span="24">
                  <div class="avatar" v-if="formData.openingpermit">
                    <div class="xinimg">
                      <i
                        class="el-icon-delete"
                        @click="khImg()"
                        v-show="!detailShow"
                        style="z-index: 10"
                      ></i>
                    </div>
                    <img
                      :src="$baseUrl + formData.openingpermit"
                      @click="zhengPreview()"
                    />
                    <!-- <i
                      class="el-icon-delete"
                      @click="khImg()"
                      v-show="!detailShow"
                      style="z-index: 10"
                    ></i> -->
                  </div>
                  <el-upload
                    v-else
                    name="image"
                    class="avatar-uploader"
                    :action="baseImgUrl"
                    :show-file-list="false"
                    :on-success="khSuccess"
                    :before-upload="beforeAvatarUpload"
                  >
                    <div class="avatar-uploader-icon">
                      <i class="el-icon-plus"></i>
                      <!-- <span>开户许可证</span> -->
                    </div>
                  </el-upload>
                </el-col>
              </el-row>
            </el-form-item>
          </div>
        </el-form>
      </el-card>
    </div>
    <div class="datasa">
      <div class="biai">法人资料</div>
      <el-card class="box-card">
        <el-form
          ref="form"
          :model="formData"
          label-width="150px"
          class="con-from"
        >
          <div style="display: flex">
            <el-form-item style="flex: 1" label="法人名称 :">
              <el-input v-model="formData.corporate_information   "></el-input>
            </el-form-item>
            <el-form-item style="flex: 1" label="法人手机号 :">
              <el-input v-model="formData.corporate_phone    "></el-input>
            </el-form-item>
          </div>
          <div  style="display: flex">
            <el-form-item style="width: 50%" label="法人身份证 :">
              <el-input v-model="formData.corporate_id_number   "></el-input>
            </el-form-item>
            <!-- <el-form-item style="flex: 1" label="法人手机号 :">
              <el-input v-model="formData.mobile"></el-input>
            </el-form-item> -->
          </div>
          <el-form-item class="" label="身份证正反面">
            <el-row :gutter="110">
              <el-col :span="24">
                <div class="avatar" v-if="formData.id_card_front  ">
                  <div class="xinimg">
                    <i
                      class="el-icon-delete"
                      @click="sfzzImg()"
                      v-show="!detailShow"
                      style="z-index: 10"
                    ></i>
                  </div>
                  <img
                    :src="$baseUrl + formData.id_card_front"
                    @click="zhengPreview()"
                  />
                  <!-- <i
                    class="el-icon-delete"
                    @click="sfzzImg()"
                    v-show="!detailShow"
                    style="z-index: 10"
                  ></i> -->
                </div>
                <el-upload
                  v-else
                  name="image"
                  class="avatar-uploader"
                  :action="baseImgUrl"
                  :show-file-list="false"
                  :on-success="sfzzSuccess"
                  :before-upload="beforeAvatarUpload"
                >
                  <div class="avatar-uploader-icon">
                    <i class="el-icon-plus"></i>
                    <span>人像面</span>
                  </div>
                </el-upload>
              </el-col>
              <el-col :span="24">
                <div class="avatar" v-if="formData.id_card_reverse">
                  <div class="xinimg">
                    <i
                      class="el-icon-delete"
                      @click="sfzfImg()"
                      v-show="!detailShow"
                      style="z-index: 10"
                    ></i>
                  </div>
                  <img
                    :src="$baseUrl + formData.id_card_reverse"
                    @click="fanPreview()"
                  />
                  <!-- <i
                    class="el-icon-delete"
                    @click="sfzfImg()"
                    v-show="!detailShow"
                  ></i> -->
                </div>
                <el-upload
                  v-else
                  name="image"
                  class="avatar-uploader"
                  :action="baseImgUrl"
                  :show-file-list="false"
                  :on-success="sfzfSuccess"
                  :before-upload="beforeAvatarUpload"
                >
                  <div class="avatar-uploader-icon">
                    <i class="el-icon-plus"></i>
                    <span>国徽面</span>
                  </div>
                </el-upload>
              </el-col>
            </el-row>
          </el-form-item>
        </el-form>
      </el-card>
    </div>
    <div class="datasa">
      <div class="biai">法人授权书</div>
      <el-card class="box-card">
        <el-form ref="form" :model="formData" class="con-froms">
          <div style="display: flex">
            <el-form-item style="flex: 1" class="" label="">
              <el-row :gutter="110">
                <el-col :span="24">
                  <div class="avatar" v-if="formData.legalAuthorization   ">
                    <div
                      style="width: 100%; display: flex; justify-content: flex-end"
                      class="xinimg"
                    >
                      <i
                        class="el-icon-delete"
                        @click="frsImg()"
                        v-show="!detailShow"
                        style="z-index: 10"
                      ></i>
                    </div>
                    <el-image
                      :src="$baseUrl + formData.legalAuthorization"
                      :fit="contain"
                    ></el-image>

                    <!-- <i
                      class="el-icon-delete"
                      @click="frsImg()"
                      v-show="!detailShow"
                      style="z-index: 10"
                    ></i> -->
                  </div>
                  <el-upload
                    v-else
                    name="image"
                    class="avatar-uploader"
                    :action="baseImgUrl"
                    :show-file-list="false"
                    :on-success="frsSuccess"
                    :before-upload="beforeAvatarUpload"
                  >
                    <div class="avatar-uploader-icon">
                      <i class="el-icon-plus"></i>
                      <!-- <span>公司章程</span> -->
                    </div>
                  </el-upload>
                </el-col>
              </el-row>
            </el-form-item>
          </div>
        </el-form>
      </el-card>
    </div>
    <div class="datasa">
      <div class="biai">企业公章</div>
      <el-card class="box-card">
        <el-form ref="form" :model="formData" class="con-froms">
          <div style="display: flex">
            <el-form-item style="flex: 1" class="" label="">
              <el-row :gutter="110">
                <el-col :span="24">
                  <div class="avatar" v-if="formData.sealcompany  ">
                    <div class="xinimg">
                      <el-button
                        icon="el-icon-delete"
                        @click="qygImg()"
                        plain
                      ></el-button>
                      <el-button plain @click="qyrenzheng">认证</el-button>
                      <!-- <i
                        class="el-icon-delete"
                        @click="frsImg()"
                        v-show="!detailShow"
                        style="z-index: 10"
                      ></i> -->
                    </div>
                    <div style="width: 80%; display: flex">
                      <img
                        :src="$baseUrl + formData.sealcompany  "
                        @click="zhengPreview()"
                      />
                    </div>
                  </div>
                  <el-upload
                    v-else
                    name="image"
                    class="avatar-uploader"
                    :action="baseImgUrl"
                    :show-file-list="false"
                    :on-success="qygSuccess"
                    :before-upload="beforeAvatarUpload"
                  >
                    <div class="avatar-uploader-icon">
                      <i class="el-icon-plus"></i>
                      <!-- <span>企业公章</span> -->
                    </div>
                  </el-upload>
                </el-col>
              </el-row>
            </el-form-item>
          </div>
        </el-form>
      </el-card>
    </div>
    <div class="datasa">
      <div class="biai">法人章</div>
      <el-card class="box-card">
        <el-form ref="form" :model="formData" class="con-froms">
          <div style="display: flex">
            <el-form-item style="flex: 1" class="" label="">
              <el-row :gutter="110">
                <el-col :span="24">
                  <div class="avatar" v-if="formData.sealpeople    ">
                    <div class="xinimg">
                      <el-button
                        icon="el-icon-delete"
                        @click="frzImg()"
                        plain
                      ></el-button>
                      <el-button plain @click="frrenzheng">认证</el-button>
                    </div>
                    <div style="width: 80%; display: flex">
                      <img
                        :src="$baseUrl + formData.sealpeople    "
                        @click="zhengPreview()"
                      />
                    </div>
                  </div>
                  <el-upload
                    v-else
                    name="image"
                    class="avatar-uploader"
                    :action="baseImgUrl"
                    :show-file-list="false"
                    :on-success="frzSuccess"
                    :before-upload="beforeAvatarUpload"
                  >
                    <div class="avatar-uploader-icon">
                      <i class="el-icon-plus"></i>
                      <!-- <span>法人章</span> -->
                    </div>
                  </el-upload>
                </el-col>
              </el-row>
            </el-form-item>
          </div>
        </el-form>
      </el-card>
    </div>
    <div v-if="0" class="datasa">
      <div class="biai">资质证书</div>
      <el-card class="box-c"> </el-card>
    </div>
    <!-- 头像未完结 -->

    <div
      style="padding: 20px; display: flex; justify-content: center"
      class="footer"
    >
      <!-- <el-button
        type=""
        style="width: 187px; font-size: 18px; padding: 15px"
        class="btn"
        @click="companyadds"
        >提交认证</el-button
      > -->
      <!-- <el-button type="" class="btn" @click="cancel">取消</el-button> -->
    </div>
    <el-dialog
      title="提示"
      :visible.sync="dialogVisible"
      width="30%"
      :before-close="handleClose"
    >
      <span>这是一段信息</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible = false"
          >确 定</el-button
        >
      </span>
    </el-dialog>
  </div>
</template>
<script>
import { companyadd, companyseal, zhizhao, companyinfo,idcard,getinfo} from "@/api/personal";
export default {
  data() {
    return {
      labelPosition: "right",
      labelPosition1: "right",
      password_again: null,
      // 表单认证
      dianji: true,
      dianjitxt: "编辑",
      zizhilist: [],
      grzx: [],
      outlist: [],
      show: false,
      modifylist: {
        password: "",
        old_password: "",
        id: "",
        user_id: "",
      },
      formData: {
        shijina: "2022-11-20",
        yingyefanwei:
          "许可项目:建没工程施工,住宅率内装装修电与安装服务·虽核安全设备安装、建筑物抓除作业漫破作业除外》设工程设建设工程质量检,施工专业作业:建筑关务分包:房地产开发经营。(依法须经批准的项,经相关部门批准后方可开展经营活动,具体经营项目以相关部门批准文件或许可证件为准)一般项目:园林绿化工程施工体育场地设施工程施工;土石方工程施工;工程管理服务,物业管理非居住房产租,对外承包工程，(除依法须经批准的项目外,凭营业执照依法自主开展经营活动(不得从事国家和本市产业政第禁止和限制类项目的经营活动。)",
        frzUrl: "",
        qygUrl: "",
        company_name: "", //中豫担保（测试）公司名称
        comtype: "", //私营企业性质
        unify_code: "91411082MA9KKXJ60L", //56667239597L8BM社会统一代码
        contact_address: "郑州管城区航海路", //详细地址
        code_img: "", ///uploads/image/20221113/6370979bce4af.jpeg企业营业执照照片
        username: "", //王治家法人姓名
        mobile: null, //13681030210法人手机号
        usercode: null, //410323197410258735法人身份证号
        id_card_front: "/uploads/image/20221113/6370b5050e1ba.jpg", //法人身份证正面
        id_card_reverse: "/uploads/image/20221113/6370b4e48100f.jpg", //法人身份证反面
        account_bank: "", //郑州银行开户行
        basic_account: null, //34859384223基本账号
        account_name: "", //中豫公司账号名称
        legalAuthorization: "", ///uploads/image/20221113/637097e85911e.jpeg法人授权书
        province: "河南省", //省
        city: "郑州市", //市
        area: "管城区", //区
        constitution: "", ///uploads/image/20221113/637097f559c0f.jpeg公司章程
        audit: "", ///uploads/image/20221113/637097c183cee.jpeg近一年审计报告
        openingpermit: "", ///uploads/image/20221113/637097d894853.jpeg开户许可证
      },
      shidata: {
        area: "",
        bank_name: "",
        bank_number: null,
        cb_number: "",
        dj_jiguan: "",
        dj_state: "",
        e_name: "",
        email: "",
        faren: "",
        hangye: "",
        hz_time: null,
        id: null,
        is_guogi: null,
        is_shangshi: null,
        ig_code: "",
        jianjie: "",
        jk_code: "",
        jy_fanwei: "",
        mobile: "",
        name: "",
        nb_addr: "",
        nsr_no: "",
        nsr_zizhi: "",
        qcc_id: "",
        qy_state: "",
        ren_number: "",
        sj_ziben: "",
        start_time: "",
        ty_code: "",
        web: "",
        yy_term_end: "g",
        yy_term_start: "",
        zc_addr: "",
        zc_no: "",
        zc_ziben: "",
      },
      form: {},
      title: "",
      open1: false,
      yeji_search: "",
      geren: {},
      corporatelist: [],
      seallist: [],
      yejilist: [],
      tabPosition: "left",
      search: "",
      baseImgUrl: "http://192.168.0.28:8082/apply/gong/uploads",
      // formData: {},
      yeji_params: {
        limit: 10,
        offset: 0,
        keywords: "",
        user_id: sessionStorage.getItem("id"),
      },
      yeji_total: null,
      activeName: "first",
      tableData: "",
      smShow: false,
      csionasd: true,
      value1:"",
      farenshe:false,
    };
  },
  created() {
    this.chaxun();
    // this.zizhis();
    // this.yejis();
    // this.seals();
    // this.corporates();
    // this.modifys();
    // this.gongsirenzheng();
  },
  methods: {
    choose() {
      this.show = !this.show;
    },
    onChangeProvince(a) {
      console.log(a);
    },
    onChangeCity(a) {
      console.log(a);
    },
    onChangeArea(a) {
      console.log(a);
      this.show = false;
    },
    frrenzheng() {
      var bbc = {
        unify_code: this.formData.unify_code,
        imgsign: this.formData.frzUrl,
        type: 1,
      };
      companyseal(bbc).then((response) => {
        console.log(response);
      });
    },
    qyrenzheng() {
      var bbc = {
        unify_code: this.formData.unify_code,
        imgsign: this.formData.qygUrl,
        type: 2,
      };
      companyseal(bbc).then((response) => {
        console.log(response);
      });
    },
       companyadds() {
      
      // var bbc = {
      //   unify_code: this.formData.unify_code,
      //   imgsign: this.formData.qygUrl,
      //   type: 2,
      // };
      companyadd(this.formData).then((response) => {
        console.log(response);
      });
    },
    csionasds() {
      this.csionasd = !this.csionasd;
    },
    dianjis() {
      console.log("datin打印状态", this.dianjitxt == "编辑");
      if (this.dianjitxt == "编辑") {
        console.log("编辑打印状态");
        this.dianji = false;
        this.dianjitxt = "完成";
      } else {
        console.log("完成打印状态");
        this.dianji = true;
        this.dianjitxt = "编辑";
      }
    },
    // 实名认证
    shiming() {
      this.smShow = true;
    },

    //公司认证信息
    gongsirenzheng() {
      gongsirenzheng().then((response) => {
        this.formData = response.data.info;
      });
    },
    //企业营业执照照片
    yySuccess(res, file) {
      console.log("上传", res);
      this.formData.code_img = res.data;
      this.zhizhaotyoe(res.data);
    },
    chaxun(){
   getinfo().then((response) => {
    console.log("企业信息",response)
      this.shidata=response.data.data.info
       this.formData = response.data.data.info;
        // this.formData = response.data.info;
      });
    },
    ResizeO() {
      const loading = this.$loading({
        lock: true,
        text: "认证中",
        customClass: "jiazaiimg",
        spinner: "el-icon-loading",
        background: "rgba(0, 0, 0, 0.7)",
      });
  
      companyinfo({ unifycode: this.formData.unify_code }).then((response) => {
        console.log("chacun", response);
        if (response.data.code == 1) {
          this.$message({
            showClose: true,
            message: "认证成功",
            type: "success",
          });
          this.shidata=response.data.data
          this.shidata.start_time=this.dateFormats(this.shidata.start_time)
          this.shidata.yy_term_start=this.dateFormats(this.shidata.yy_term_start)
          this.shidata.hz_time=this.dateFormats(this.shidata.hz_time)
          if(this.shidata.yy_term_end==0){
            this.shidata.yy_term_end="无固定期限"
          }else{
             this.shidata.yy_term_end=this.dateFormats(this.shidata.yy_term_end)
          }
           this.formData.company_name=this.shidata.name
          this.formData.comtype=this.shidata.qy_state
            this.formData.contact_address=this.shidata.zc_addr
              this.formData.username=this.shidata.faren
                this.formData.mobile=this.shidata.mobile

          this.csionasd = true;
        } else {
          this.$message({
            showClose: true,
            message: response.data.msg,
            type: "error",
          });
        }
        loading.close();
      });
    },
    zhizhaotyoe(res) {
      const loading = this.$loading({
        lock: true,
        text: "识别中",
        customClass: "jiazaiimg",
        spinner: "el-icon-loading",
        background: "rgba(0, 0, 0, 0.7)",
      });
      // setTimeout(() => {

      // }, 6000);
      zhizhao({ file: res }).then((response) => {
        if (response.data.code == 200) {
          console.log("营业执照", response.data.code, response.data.data);
          this.formData.unify_code = response.data.data.unified_identifier;
          this.$message({
            showClose: true,
            message: response.data.msg,
            type: "success",
          });
        } else {
          this.$message({
            showClose: true,
            message: response.data.msg,
            type: "error",
          });
        }
        loading.close();
      });
    },
    yyImg() {
      this.formData.code_img = "";
    },
    //公司章程
    zcSuccess(res, file) {
      console.log("上传", res);
      this.formData.constitution = res.data;
    },
    zcImg() {
      this.formData.constitution = "";
    },
    //开户许可证
    khSuccess(res, file) {
      console.log("上传", res);
      this.formData.openingpermit = res.data;
    },
    khImg() {
      this.formData.openingpermit = "";
    },
    //近一年审计报告
    sjSuccess(res, file) {
      console.log("上传", res);
      this.formData.audit = res.data;
    },
    sjImg() {
      this.formData.audit = "";
    },
    //法人授权书
    frsSuccess(res, file) {
      console.log("上传", res);
      this.formData.legalAuthorization = res.data;
    },
    frsImg() {
      this.formData.legalAuthorization = "";
    },
    //法人身份证正面
    sfzzSuccess(res, file) {
      console.log("上传", res);
      this.formData.id_card_front = res.data;
      this.renx(res.data)
    },
    renx(e){
  idcard({file:e}).then((response) => {
   console.log("shenfenz",response)
   if(response.data.code==200){
    this.formData.usercode=response.data.data.id_number
    this.farenshe=true
   }
      });
    },
    sfzzImg() {
      this.formData.id_card_front = "";
    },
    //法人身份证反面
    sfzfSuccess(res, file) {
      console.log("上传", res);
      this.formData.id_card_reverse = res.data;
    },
    sfzfImg() {
      this.formData.id_card_reverse = "";
    },
    qygSuccess(res, file) {
      console.log("上传", res);
      this.formData.qygUrl = res.data;
    },
    qygImg() {
      this.formData.qygUrl = "";
    },
    frzSuccess(res, file) {
      console.log("上传", res);
      this.formData.frzUrl = res.data;
    },
    frzImg() {
      this.formData.frzUrl = "";
    },
    yulan() {
      var url = this.$baseUrl + this.formData.constitution;
      let link = document.createElement("a");
      link.style.display = "none";
      link.style.download = "";
      link.target = "_blank";
      link.href = url;
      // console.log(link.href)
      // link.setAttribute("download", ".pdf");
      // +'.pdf' 通过不同的后缀名下载不同的文件
      //这里下载的是pdf格式的文件，拿到接口里的res也必须是pdf的文件流
      // document.body.appendChild(link);
      link.click();
      URL.revokeObjectURL(link.href);
    },
    // yyrUpload(file) {
    //   console.log("图片")
    // },
    details(rows) {
      this.open1 = true;
      this.formData = rows;
    },
    handleEdit(index, row) {
      console.log(index, row);
    },
    handleDelete(index, row) {
      console.log(index, row);
    },
     dateFormats (value) {
	let date = new Date(value * 1000); //时间戳为10位需*1000，时间戳为13位的话不需乘1000
	let y = date.getFullYear();
	let MM = date.getMonth() + 1;
	MM = MM < 10 ? "0" + MM : MM;
	let d = date.getDate();
	d = d < 10 ? "0" + d : d;
	let h = date.getHours();
	h = h < 10 ? "0" + h : h;
	let m = date.getMinutes();
	m = m < 10 ? "0" + m : m;
	let s = date.getSeconds();
	s = s < 10 ? "0" + s : s;
	return y + "-" + MM + "-" + d //多种时间格式的拼接
  }
  },
};
</script>
<style>
.jiazaiimg {
  font-size: 50px !important;
  /* width: 100%; */
}
.jiazaiimg .el-loading-text {
  font-size: 16px !important;
}
.shiji {
  width: 100% !important;
}
.el-form-item {
  margin-bottom: 10px !important;
}
.box-card .el-card__body {
  padding: 0px !important;
}
.xindes .el-table__body-wrapper {
  height: 36vh;
  overflow: auto;
  position: relative;
}
</style>
<style scoped lang="scss">
.xinimg {
  width: 100%;
  justify-content: flex-end;
  display: flex;
}
.datasa {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.box-card {
  width: 75%;
  padding: 0 !important;
}
.box-c {
  width: 75%;
  // padding: 0 !important;
}
.con-from {
  padding: 20px;
  padding-right: 87px;
}
.con-froms {
  padding: 20px;
  // padding-right: 87px;
}
.biai {
  background: #dddddd;
  width: 100%;
  padding: 10px;
  font-size: 20px;
  margin-bottom: 20px;
}
.content {
  height: 82vh;
  // background-color: #fff;
}

ul,
li {
  list-style: none;
}
.btn {
  // padding: 20px;
  color: #fff;
  background-color: #409eff;
  border-color: #409eff;
}
.header {
  position: relative;
  display: flex;
  justify-content: space-around;
  width: 100%;
  height: 60px;
  line-height: 60px;
  margin-bottom: 10px;
}

.header .header-left {
  position: absolute;
  left: 20px;
  top: -20px;
}

.header .header-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: 100%;
}

.header .header-right .img1 {
  position: absolute;
  right: 130px;
  top: 15px;
  width: 20px;
  text-align: center;
  height: 20px;
}

.header .header-right .img2 {
  position: absolute;
  right: 70px;
  top: 13px;
  width: 20px;
  height: 20px;
  border: none;
}

.header .header-right .img2 .img3 {
  position: absolute;
  left: 10px;
  bottom: 2px;
  width: 20px;
  height: 20px;
}

.personal_box {
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;

  .box_personal_content {
    width: 100%;
  }

  .el-form-item {
    margin-bottom: 10px !important;
  }
}
.personal_box1 {
  width: 60%;
  display: flex;
  justify-content: center;
  margin: 0 auto;
}
.Personal {
  width: 40%;
}

::v-deep .el-form--label-top .el-form-item__label {
  padding: 0 !important;
}

::v-deep .Personal .el-input__inner {
  width: 100%;
  // border: 0;
  // border: #ccc 1px solid;
  border-radius: 0;
  padding: 0 0 0 10px;
}

::v-deep.el-input.is-disabled .el-input__inner {
  // background-color: #fff;
  color: #000000;
}
.xinimgs {
  display: flex;
  justify-content: space-between;
}
// 搜索框
.search {
  float: right;
  width: 15%;
  height: 40px;
  border: 1px solid #ccc;
  border-radius: 5px;
  display: flex;

  ::v-deep .el-input__inner {
    border: none;
  }

  ::v-deep .el-button {
    border: none;
  }
}

.update_password {
  width: 100%;
  display: flex;
  justify-content: center;

  .update {
    width: 30%;
  }

  .el-form-item {
    margin-bottom: 10px !important;
  }
}

::v-deep.el-form--inline .el-form-item {
  width: 100%;
}

::v-deep.el-form--inline .el-form-item__content {
  width: 100%;
}

.block {
  position: fixed;
  bottom: 20px;
  right: 20px;
}

.password li:nth-of-type(4) button {
  background-color: #1795ff;
  width: 200px;
  height: 40px;
  border: none;
}

.el-tabs--left {
  height: 100%;
}

::v-deep.el-tabs--left .el-tabs__item.is-left {
  width: 200px;
  height: 50px;
  line-height: 50px;
  text-align: center;
  font-size: 16px;
  font-family: MicrosoftYaHei-, MicrosoftYaHei;
  font-weight: normal;
  color: #000000;
}

::v-deep.el-tabs--left .el-tabs__item.is-active {
  background: #1795ff;
  color: #fff;
}

.formUser {
  margin-top: 100px;
}

.card_father {
  height: 64vh;
  margin-top: 10px;
  overflow: auto;

  .card {
    width: 44%;
    height: 200px;
    background: #ffffff;
    box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.16);
    border-radius: 8px 8px 8px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 1;
    margin: 20px;

    .card_content {
      width: 100%;
      height: 100%;
      padding: 10px;
    }

    .caakuia {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .kuaidcaa {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
  }
}
.el-icon-delete {
  display: block;
}
::v-deep .tab_left > .el-tabs__header {
  height: 82vh !important;
  background-color: #fff;
}

::v-deep .tab_left > .el-tabs__content {
  height: 100%;
  overflow-y: auto;
}

// ::v-deep .el-tabs__nav-wrap::after {
//   content: "";
//   position: absolute;
//   left: 0;
//   bottom: 0;
//   width: 100%;
//   height: 2px;
//   background-color: #ffff !important;
//   z-index: 99;
// }

.imgBox {
  display: flex;
  flex-direction: column;
  width: 100%;
  // height: 120px;
  margin-bottom: 10px;

  img {
    width: 100%;
    height: 140px;

    // border: 1px solid;
    margin-bottom: 10px;
  }
}
.avatar-uploader {
  display: flex;
  justify-content: center;
}
// 新增弹窗上传图片
.avatar-uploader .el-upload {
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.avatar-uploader-icon {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 4px 4px 4px 4px;
  border: 1px dashed rgba(0, 0, 0, 0.15);
  font-size: 14px;
  color: #8c939d;
  width: 300px;
  height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  .el-icon-plus {
    font-size: 28px;
  }
}

.avatar {
  // width: 200px;
  // height: 138px;
  display: flex;
  align-items: center;
  font-size: 20px;
  flex-direction: column;
  // margin-bottom: 8px;
  img {
    // width: 100%;
    border: 1px #dddddd solid;
    height: 250px;
    margin-right: 8px;
  }
}

.el-row {
  margin: 0 !important;
  display: flex;
}

.el-col-24 {
  padding: 0 !important;
  margin-bottom: 10px;
}

.sm {
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translate(-50%);
}
</style>
<style scoped>
.divwrap {
  height: 400px;
  overflow-y: auto;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
}
.divwrap >>> .distpicker-address-wrapper {
  color: #999;
}
.divwrap >>> .address-header {
  position: fixed;
  bottom: 400px;
  width: 100%;
  background: #000;
  color: #fff;
}
.divwrap >>> .address-header ul li {
  flex-grow: 1;
  text-align: center;
}
.divwrap >>> .address-header .active {
  color: #fff;
  border-bottom: #666 solid 8px;
}
.divwrap >>> .address-container .active {
  color: #000;
}
</style>